package xyz.wadewhy.basicstest.designPatterns.AbstractFactoryModel;

/**
 * @ClassName FurnitureUtil
 * @Description 业务用途
 * @Author zhongzihao
 * @Date 2021/12/19 7:37 下午
 * @Version 1.0
 **/
public class FurnitureUtil {
    private ChairInterface chairInterface;
    private TableInterface tableInterface;

    public FurnitureUtil() {
    }

    public FurnitureUtil(FurnitureFactory factory) {
        this.chairInterface = factory.getChairInterface();
        this.tableInterface = factory.getTableInterface();
    }

    public void begin() {
        chairInterface.sitOn();
        tableInterface.putSomething();
    }
}
